<?php
/**
 * 物流成本基础（通用）
 * (model)
 */
namespace App\Models\MonthlyReportLT\Cost;
use Illuminate\Database\Eloquent\Model;
class LogisticsBasics extends Model
{
    protected $table = 'lt_mr_cost_logistics_basics';

    protected $guarded  = [];

    public static function getLogistics($pSkuId,$date){
        $re = self::query()->where('psku_id',$pSkuId)
            ->where('b_date',$date)
            ->first();
        if($re){
            return $re->os_fei + $re->fba_fei + $re->cn_fei;
        }else{
            return 0;
        }
    }
}
